package com.rupertjones.globalcron.web;

import com.rupertjones.globalcron.web.service.JobService;
import net.sourceforge.stripes.action.DefaultHandler;
import net.sourceforge.stripes.action.ForwardResolution;
import net.sourceforge.stripes.action.Resolution;
import net.sourceforge.stripes.integration.spring.SpringBean;

/**
 * <p>&copy Rupert Jones 2011,2012</p>
 *
 * @author rup
 */
public class StopAllAction extends AbstractFormAction {

    @SpringBean
    private JobService jobService;

    @DefaultHandler
    public Resolution view() {
        jobService.stopAll();
        return new ForwardResolution(HOME_ACTION);
    }
}
